from django.conf.urls import url

from check_ip import check_ip
from user import views

urlpatterns = [

    #用浏览器最后可以不加 / ,但是用postman测试的时候，应该加上 / ,因为不会自动添加
    url(r'^index/$', views.index,name="resp_room"),
    url(r'^news3/$', views.news3),
    url(r'^news4/$', views.news4),
    url(r'^news5/$', views.news5),
    url(r'^resp/$', views.resp),
    # url(r'^post/$', views.post),

    # url(r'^do_post/$', views.do_post),

    #类视图的URL一定要加括号，views.PostView.as_view()
    url(r'^post2/$', views.PostView.as_view()),

    #可以给类视图使用装饰器过滤黑名单，这种方法可视化太差，不推荐使用
    # url(r'^post2/$', check_ip(views.PostView.as_view())),


    # url(r'^set_cookie/$',views.set_cookie),
    # url(r'^get_cookie/$',views.get_cookie),

]
